package com.us.jack.dto;

import java.util.Date;

import com.us.jack.pojo.User;

public class UserDto {
	private int id;
	private String userName;
	private String password;
	private String rePassword;
	private Integer age;
	private Date birthday;

	public Integer getAge() {
		return age;
	}

	public Date getBirthday() {
		return birthday;
	}

	public int getId() {
		return id;
	}

	public String getPassword() {
		return password;
	}

	public String getRePassword() {
		return rePassword;
	}

	public String getUserName() {
		return userName;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setRePassword(String rePassword) {
		this.rePassword = rePassword;
	}

	public void setUser(User user) {
		user.setId(id);
		user.setUserName(userName);
		user.setPassword(password);
		user.setAge(age);
		user.setBirthday(birthday);
	}
	
	public void setSelf(User user) {
		id = user.getId();
		userName = user.getUserName();
		password = user.getPassword();
		age = user.getAge();
		birthday = user.getBirthday();		
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
}
